package com.gcph.zhuoba.util;

public class TouchUtil {

	//一个点是否在圆内
	public static boolean isPointInCircle(float touchX,float touchY,float x,float y,float radius)
	{
		if(Math.abs(touchX-x)*Math.abs(touchX-x)+Math.abs(touchY-y)*Math.abs(touchY-y)<radius*radius)
		{
			return true;
		}else
		{
			return false;
		}
	}
	
	
	//得到二个点的距离
	public static double getPointDistance(float x1,float y1,float x2,float y2)
	{
		double destance = Math.sqrt(Math.abs(x1-x2)*Math.abs(x1-x2)+Math.abs(y1-y2)*Math.abs(y1-y2));
		return destance;
	}
}